home *** CD-ROM | disk | FTP | other *** search
/ CD Ware Multimedia 1995 May / cd Ware (Juegos) Epimundo.iso / DOS / C / DATA_MG.ZIP / L.H < prev    next >
Encoding:
C/C++ Source or Header  |  1990-03-30  |  755 b   |  37 lines

  1. #define CHAR     0
  2. #define INT      1
  3. #define LONG     2
  4. #define CHARSTR  3
  5. #define VOIDPNTR 3
  6.  
  7. #define ASCEND  0
  8. #define DESCEND 1
  9.  
  10. union _DATA_ {
  11.     char Char; /* I know, I Know, it's redundant, but it is pretty */
  12.     int Int;
  13.     long Long;
  14.     char *CPntr;
  15.     void *VPntr;
  16.     };
  17.  
  18. typedef union _DATA_ Generic;
  19. typedef struct _NODE_ Node;
  20.  
  21. struct _NODE_ {
  22.     Node *Next, *Prev;
  23.     int DataType;
  24.     union _DATA_ Data;
  25.     } Node;
  26.  
  27. typedef Node * List;
  28.  
  29. Node *MakeNode(void);
  30. Node *FindNode(Node *P, void *Data);
  31. Node *MakeList(int DataType);
  32. void ListNodes(Node *P, int Dir);
  33. int  AddNode(Node *List, void *Data);
  34. void DeleteNode(Node *P);
  35. int  IntCmp(Node *N, int *D2);
  36. int  LongCmp(Node *N, long *D2);
  37. int  StringCmp(Node *N, char *Str);